package pers.liyan.shi.springboot.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

import javax.websocket.server.ServerEndpoint;

/**
 * WebSocket配置类
 *
 * @author shily
 * @date 2019/6/17 21:55
 */
@Configuration
public class WebSocketConfig {

    /**
     * 注入{@link ServerEndpointExporter},
     * 会自动扫描注入使用{@link ServerEndpoint}标注的类
     *
     * @return org.springframework.web.socket.server.standard.ServerEndpointExporter
     * @author shily
     * @date 2019/6/17 21:57
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }


}
